package com.moon.admin.tools.config;


import com.moon.admin.framework.util.JsonUtils;
import com.moon.admin.tools.domain.Message;

import javax.websocket.Encoder;
import javax.websocket.EndpointConfig;

/**
 * @author moon
 */
public class MessageEncoder implements Encoder.Text<Message> {
  @Override
  public String encode(Message o) {
    return JsonUtils.obj2string(o);
  }

  @Override
  public void init(EndpointConfig endpointConfig) {

  }
  @Override
  public void destroy() {

  }
}
